<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: FeedFetcher::FeedFetcher</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">FeedFetcher::FeedFetcher</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/feed_fetcher_rb.html">
                feed_fetcher.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000012">feed_link_from_html</a>&nbsp;&nbsp;
      <a href="#M000013">fetch_page</a>&nbsp;&nbsp;
      <a href="#M000014">get_doc</a>&nbsp;&nbsp;
      <a href="#M000011">html_has_feed_link?</a>&nbsp;&nbsp;
      <a href="#M000007">is_feed?</a>&nbsp;&nbsp;
      <a href="#M000010">is_html_page?</a>&nbsp;&nbsp;
      <a href="#M000009">is_xml_feed?</a>&nbsp;&nbsp;
      <a href="#M000008">parse</a>&nbsp;&nbsp;
      <a href="#M000015">url_with_protocol</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000007.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000007.html');return false;">
          <span class="method-name">is_feed?</span><span class="method-args">(page_url , option)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Check if the url passed is a feed links or contains a feed link returns
diferents object depends of what option was passed
</p>
<p>
option:
</p>
<ul>
<li>:only_verify : return true if is a feed url or the url page contains a feed
url link

</li>
<li>:feed_url :return a feed url if is a feed url or a feed url link if
it&#8217;s contatined in the url page

</li>
<li>:xml : return the xml feed and the feed url in this form: {:file =&gt; file
, :feed_url =&gt; feed_url}

</li>
</ul>
        </div>
      </div>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000008.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000008.html');return false;">
          <span class="method-name">parse</span><span class="method-args">(url_or_xml , option = :feed_url)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Parse the feed_url and return the feed model
</p>
<p>
option:
</p>
<ul>
<li>:feed_url (set with this value when you pass the feed url)

</li>
<li>:xml (set with this value when you pass the hash with the xml feed file and
feed url)

</li>
</ul>
        </div>
      </div>

      <h3 class="section-bar">Protected Class methods</h3>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000012.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000012.html');return false;">
          <span class="method-name">feed_link_from_html</span><span class="method-args">(doc)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the feed link from doc html file, else return nil.
</p>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000013.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000013.html');return false;">
          <span class="method-name">fetch_page</span><span class="method-args">(site_url_to_open)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a file from the url given as a param
</p>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000014.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000014.html');return false;">
          <span class="method-name">get_doc</span><span class="method-args">(site_url_to_open)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return Hpricot parsed file from the url given as a params
</p>
        </div>
      </div>

      <div id="method-M000011" class="method-detail">
        <a name="M000011"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000011.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000011.html');return false;">
          <span class="method-name">html_has_feed_link?</span><span class="method-args">(doc)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return if doc is conatins a xml feed link RSS or ATOM.
</p>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000010.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000010.html');return false;">
          <span class="method-name">is_html_page?</span><span class="method-args">(doc)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return if doc is a html file
</p>
        </div>
      </div>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000009.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000009.html');return false;">
          <span class="method-name">is_xml_feed?</span><span class="method-args">(doc)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return true if dic is a xml feed RSS or ATOM.
</p>
        </div>
      </div>

      <div id="method-M000015" class="method-detail">
        <a name="M000015"></a>

        <div class="method-heading">
          <a href="FeedFetcher.src/M000015.html" target="Code" class="method-signature"
            onclick="popupCode('FeedFetcher.src/M000015.html');return false;">
          <span class="method-name">url_with_protocol</span><span class="method-args">(original_url)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>